import React from 'react';
import { Route, Link, Redirect } from 'react-router-dom'

import ES6 from './video/ES6'
import Node from './video/Node'
import Vue from './video/Vue'

function Video() {
  return (
    <>
      <Redirect to="/video/es6" />
      <ul>
        <li>
          <Link to="/video/es6">ES6教程</Link>
        </li>
        <li>
          <Link to="/video/node">Node教程</Link>
        </li>
        <li>
          <Link to="/video/vue">Vue教程</Link>
        </li>
      </ul>
      <div style={{ paddingLeft: '20px' }}>
        <h3>视频教程</h3>
        <Route path="/video/es6/" component={ES6}></Route>
        <Route path="/video/node/" component={Node}></Route>
        <Route path="/video/vue/" component={Vue}></Route>
      </div>
    </>
  )
}

export default Video
